def test():
    i = 0
    while i < 5:
        if i == 0:
            temp = yield i
            print(temp)
        else:
            yield i
        i += 1


t = test()

print(t.__next__())  # 0
print(t.send("ywc"))  # 1
